From 6f7b0cac94c2c12d192f3945ef5befeb2949ea51 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Wed, 17 Jul 2013 22:52:53 -0400 Subject: [PATCH] Deprecate tear off menus --- gtk/gtkcombobox.c | 16 ++++++++++++++-- gtk/gtkmenu.c | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index c5ecb293e4..7ae1321629 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -827,6 +827,8 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass) * Note that this only affects menu style combo boxes. * * Since: 2.6 + * + * Deprecated: 3.10 */ g_object_class_install_property (object_class, PROP_ADD_TEAROFFS, @@ -834,7 +836,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass) P_("Add tearoffs to menus"), P_("Whether dropdowns should have a tearoff menu item"), FALSE, - GTK_PARAM_READWRITE)); + GTK_PARAM_READWRITE | G_PARAM_DEPRECATED)); /** * GtkComboBox:has-frame: @@ -867,6 +869,8 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass) * when the popup is torn-off. * * Since: 2.10 + * + * Deprecated: 3.10 */ g_object_class_install_property (object_class, PROP_TEAROFF_TITLE, @@ -874,7 +878,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass) P_("Tearoff Title"), P_("A title that may be displayed by the window manager when the popup is torn-off"), NULL, - GTK_PARAM_READWRITE)); + GTK_PARAM_READWRITE | G_PARAM_DEPRECATED)); /** @@ -4997,6 +5001,8 @@ gtk_combo_box_start_editing (GtkCellEditable *cell_editable, * Gets the current value of the :add-tearoffs property. * * Return value: the current value of the :add-tearoffs property. + * + * Deprecated: 3.10 */ gboolean gtk_combo_box_get_add_tearoffs (GtkComboBox *combo_box) @@ -5015,6 +5021,8 @@ gtk_combo_box_get_add_tearoffs (GtkComboBox *combo_box) * menu item. * * Since: 2.6 + * + * Deprecated: 3.10 */ void gtk_combo_box_set_add_tearoffs (GtkComboBox *combo_box, @@ -5048,6 +5056,8 @@ gtk_combo_box_set_add_tearoffs (GtkComboBox *combo_box, * string which must not be freed. * * Since: 2.10 + * + * Deprecated: 3.10 */ const gchar* gtk_combo_box_get_title (GtkComboBox *combo_box) @@ -5076,6 +5086,8 @@ gtk_combo_box_update_title (GtkComboBox *combo_box) * Sets the menu's title in tearoff mode. * * Since: 2.10 + * + * Deprecated: 3.10 */ void gtk_combo_box_set_title (GtkComboBox *combo_box, diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index ece083dcab..5280975e52 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -606,6 +606,14 @@ gtk_menu_class_init (GtkMenuClass *class) GTK_TYPE_WIDGET, GTK_PARAM_READWRITE)); + /** + * GtkMenu:tearoff-title: + * + * A title that may be displayed by the window manager when this + * menu is torn-off. + * + * Deprecated: 3.10 + **/ g_object_class_install_property (gobject_class, PROP_TEAROFF_TITLE, g_param_spec_string ("tearoff-title", @@ -620,6 +628,8 @@ gtk_menu_class_init (GtkMenuClass *class) * A boolean that indicates whether the menu is torn-off. * * Since: 2.6 + * + * Deprecated: 3.10 **/ g_object_class_install_property (gobject_class, PROP_TEAROFF_STATE, @@ -2223,6 +2233,8 @@ tearoff_window_destroyed (GtkWidget *widget, * displayed as drop down menu which persists as long as the menu is * active. It can also be displayed as a tearoff menu which persists * until it is closed or reattached. + * + * Deprecated: 3.10 */ void gtk_menu_set_tearoff_state (GtkMenu *menu, @@ -2337,6 +2349,8 @@ gtk_menu_set_tearoff_state (GtkMenu *menu, * See gtk_menu_set_tearoff_state(). * * Return value: %TRUE if the menu is currently torn off. + * + * Deprecated: 3.10 */ gboolean gtk_menu_get_tearoff_state (GtkMenu *menu) @@ -2357,6 +2371,8 @@ gtk_menu_get_tearoff_state (GtkMenu *menu) * menu. If @title is %NULL, the menu will see if it is attached * to a parent menu item, and if so it will try to use the same * text as that menu item's label. + * + * Deprecated: 3.10 */ void gtk_menu_set_title (GtkMenu *menu, @@ -2384,6 +2400,8 @@ gtk_menu_set_title (GtkMenu *menu, * Return value: the title of the menu, or %NULL if the menu * has no title set on it. This string is owned by GTK+ * and should not be modified or freed. + * + * Deprecated: 3.10 **/ const gchar * gtk_menu_get_title (GtkMenu *menu) -- 2.30.2